<!-- InstanceEndEditable -->
<style>
    /* 打开宽度限制 */
    .popover {
        max-width: 90vw;
    }
</style>

<div class="container-fluid" id="mainsale">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-info" id="headeralert">
                <button type="button" class="close">×</button>
                <p></p>
            </div>
        </div>
    </div>
    <div class="ntDesktop">
        <div class="ntDesktop-head">销售财务界面（收款会计）</div>

        <div class="row" style="padding-top:0px">
            <div class="col-md-7">
                <ul class="nav nav-tabs">
                    <li>
                        <a href="#got" data-toggle="tab" @click="changestatus('7')">
                            + 支票收到 <span class="label label-info">{{countnum.countnumseven}}</span>
                        </a>
                    </li>
                    <li class="active" @click="changestatus('1')">
                        <a href="#new" data-toggle="tab">
                            + 新订单 <span class="label label-info">{{countnum.countnumone}}</span>
                        </a>
                    </li>
                    <li>
                        <a href="#new" data-toggle="tab" @click="changestatus('2')">
                            待收款 <span class="label label-info">{{countnum.countnumtwo}}</span>
                        </a>
                    </li>
                    <li>
                        <a href="#new" data-toggle="tab" @click="changestatus('3')">
                            确认收款 <span class="label label-info">{{countnum.countnumthree}}</span>
                        </a>
                    </li>
                    <li>
                        <a href="#finish" data-toggle="tab" @click="changestatus('4')">
                            + 已完成 <span class="label label-default">{{countnum.countnumfor}}</span>
                        </a>
                    </li>
                    <li @click="changestatus('5')">
                        <a href="#timeout" data-toggle="tab">
                            + 逾期 <span class="label label-danger">{{countnum.countnumfive}}</span>
                        </a>
                    </li>
                    <li @click="changestatus('6')">
                        <a href="#fail" data-toggle="tab">
                            + 坏账 <span class="label label-info">{{countnum.countnumsix}}</span>
                        </a>
                    </li>

                </ul>
            </div>
            <div class="col-md-5">
                <div class="col-md-8">
                    <div class="input-group">
                        <input type="text" class="form-control" @keyup.13="render" v-model="dname"
                               placeholder="输入公司名或订单号">
                        <div class="input-group-btn">
                            <button class="btn btn-primary" @click="render"><span class="fa fa-search"></span> 查找
                            </button>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 text-right">
                    <button class="btn btn-primary"><span class="fa fa-print"></span>打印</button>
                </div>
            </div>
        </div>

        <div class="row tab-content">
            <!-- 支票收到 -->
            <div class="col-md-12 tab-pane" id="got">
                <table class="table table-striped table-hover ntTable">
                    <thead>
                    <tr>
                        <th width="4%"> 订单号 </th>
                        <th width="4%"> 优先级 </th>
                        <th> 时间 </th>
                        <th> 应收金额 </th>
                        <th> 定金 </th>
                        <th> 收款日期 </th>
                        <th> 付款方式 </th>
                        <th> 签收人 </th>
                        <th> 金额 </th>
                        <th> 业务员 </th>
                        <th> 编辑 </th>
                        <th> 备注 </th>
                        <th> 操作 </th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(item,index) in list" :key="item.id">
                        <td>
                                <span v-if="item.sale_id" @mouseover="setpopper" href="#" data-toggle="popover" placement="right" class="btn btn-sm btn-default" title="公司名称">
                                     {{formatUnit(item.sale_id,'ID')}}
                                    <span class="content">
                                        <div style="width:20vw">
                                            {{item.company_name}}
                                        </div>
                                    </span>
                                </span>
                        </td>
                        <td align="center"><span class="label label-primary f-1" v-if="item.sale_id">{{item.priority}}</span></td>
                        <td class="text-success"><b v-if="item.sale_id">{{item.interval_time}}</b></td>
                        <td align="right"><span v-if="item.sale_id">{{formatUnit(item.pay,'BRL')}}<small class="unit">BRL</small></span></td>
                        <td align="center"><span v-if="item.sale_id">{{item.pledge=='1'? 'O':'-'}}</span></td>
                        <td><span v-if="item.sale_id">{{item.pay_date}}</span></td>
                        <td>
                            <button v-if="item.paytype_id==3 || item.paytype_id==4" @mouseover="setpopper"
                                    class="btn btn-sm btn-default"
                                    data-toggle="popover"
                                    placement="right" title="支票详情">
                                {{item.paytype_name}}
                                <div class="content">
                                    <div style="width:25vw">
                                        <table class="table">
                                            <tbody>
                                            <tr>
                                                <td width="25%">开票银行</td>
                                                <td>{{item.typedata.bank_name}}</td>
                                            </tr>
                                            <tr>
                                                <td>支票号</td>
                                                <td>{{item.typedata.number}}</td>
                                            </tr>
                                            <tr>
                                                <td>支票署名</td>
                                                <td>{{item.typedata.signature}}</td>
                                            </tr>
                                            <tr>
                                                <td>付款日期</td>
                                                <td>{{item.typedata.pay_day_date}}</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </button>
                        </td>
                        <td>{{item.got_name?item.got_name:'-'}}<br>
                            <small>{{item.got_date}}</small></td>
                        <td align="right" :class="item.class">
                            {{formatUnit(item.amount,'BRL')}}<small class="unit">BRL</small>
                            <br>
                            <span :class="item.class">{{formatUnit(item.amount/item.pay*100,'%')}}</span>
                            <small class="unit">%</small>
                        </td>
                        <td>{{item.saler_name}}</td>
                        <td>{{item.upname}}<br>
                            <small>{{item.update}}</small>
                        </td>
                        <td><button @mouseover="setpopper" v-if="item.remark.length>0" class="btn btn-sm btn-default"
                                    data-toggle="popover" title="付款登记（8888）备注">
                            备注
                            <div class="content">
                                <div style="width:30vw">
                                    <ul>
                                        <li v-for="remarkname in item.remark" :key="remarkname.id">
                                            {{remarkname.remark}}
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </button></td>
                        <td align="right">
                            <button v-if="item.got_at==0 && adminauth_ids.indexOf(254)!=-1" class="btn btn-sm btn-default" @click="huifucancel(item.chequeid,item.saleid,3)">收到</button>
                            <button v-if="item.got_at>0 && adminauth_ids.indexOf(255)!=-1" class="btn btn-sm btn-primary" @click="huifucancel(item.chequeid,item.saleid,4)">取消</button>
                        </td>
                    </tr>
                    <tr style="text-align: center;" v-if="list.length==0">
                        <td colspan="13" class="no_date">{:strtoupper(lang('no_data'))}</td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="13" align="right">列表金额合计: {{formatUnit(sumcount,'BRL')}} <small class="unit">BRL</small></td>
                    </tr>
                    </tfoot>
                </table>
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <ul class="pagination" id="paginationfive" v-show="list.length!=0">
                        </ul>
                    </div>
                </div>
            </div>
            <!-- 收款 新订单 列表 -->
            <div class="col-md-12 tab-pane active" id="new">
                <table class="table table-striped table-hover ntTable">
                    <thead>
                    <tr>
                        <th width="4%"> 订单号</th>
                        <th width="4%"> 优先级</th>
                        <th> 时间</th>
                        <th> 应收金额</th>
                        <th> 定金</th>
                        <th> 收款日期</th>
                        <th> 付款方式</th>
                        <th> 收款账号</th>
                        <th> 金额</th>
                        <th> 业务员</th>
                        <th> 编辑</th>
                        <th> 备注</th>
                        <th> 操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(item,index) in list" :key="item.id">
                        <td><span v-if="item.sale_id" data-popper="span" @mouseover="setpopper" href="#" data-toggle="popover"
                                  placement="right"
                                  class="btn btn-sm btn-default" title="公司名称">
                        {{formatUnit(item.sale_id,'ID')}}
                        <span class="content">
                        <div style="width:20vw">
                        {{item.company_name}}
                        </div>
                        </span>
                        </span></td>
                        <td align="center"><span class="label label-primary f-1"
                                                 v-if="item.sale_id">{{item.priority}}</span></td>
                        <td class="text-success"><b v-if="item.sale_id">{{item.interval_time}}</b></td>
                        <td align="right"><span v-if="item.sale_id">{{formatUnit(item.pay,'BRL')}}<small class="unit">BRL</small></span>
                        </td>
                        <td align="center"><span v-if="item.sale_id">{{item.pledge=='1'? 'O':'-'}}</span></td>
                        <td><span v-if="item.sale_id">{{item.pay_date}}</span></td>
                        <td>
                            <!--现金-->
                            <span v-if="item.paytype_id==1">{{item.paytype_name}}</span>
                            <!--支票-->
                            <button v-if="item.paytype_id==3 || item.paytype_id==4" @mouseover="setpopper"
                                    class="btn btn-sm btn-default"
                                    data-toggle="popover"
                                    placement="right" title="支票详情">
                                {{item.paytype_name}}
                                <div class="content">
                                    <div style="width:25vw">
                                        <table class="table">
                                            <tbody>
                                            <tr>
                                                <td width="25%">开票银行</td>
                                                <td>{{item.typedata.bank_name}}</td>
                                            </tr>
                                            <tr>
                                                <td>支票号</td>
                                                <td>{{item.typedata.number}}</td>
                                            </tr>
                                            <tr>
                                                <td>支票署名</td>
                                                <td>{{item.typedata.signature}}</td>
                                            </tr>
                                            <tr>
                                                <td>付款日期</td>
                                                <td>{{item.typedata.pay_day_date}}</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </button>
                            <!--转账-->
                            <button v-if="item.paytype_id==5" @mouseover="setpopper"
                                    class="btn btn-sm btn-default"
                                    data-toggle="popover" placement="right" title="转账详情">
                                {{item.paytype_name}}
                                <div class="content">
                                    <div style="width:25vw">
                                        <table class="table">
                                            <tbody>
                                            <tr>
                                                <td width="25%">汇出账号</td>
                                                <td>
                                                    {{item.typedata.co_banknumber}} <br>
                                                    {{item.typedata.co_bankname}}
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>流水号</td>
                                                <td>{{item.typedata.number}}</td>
                                            </tr>
                                            <tr>
                                                <td>存入账号</td>
                                                <td>
                                                    {{item.typedata.account_banknumber}}<br>
                                                    {{item.typedata.account_bankname}}
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </button>
                            <!--银行单-->
                            <button v-if="item.paytype_id==6" @mouseover="setpopper" class="btn btn-sm btn-default" data-toggle="popover" placement="right" title="银行单详情">
                                {{item.paytype_name}}
                                <div class="content">
                                    <div style="width:25vw">
                                        <table class="table">
                                            <tbody>
                                            <tr>
                                                <td>银行单号</td>
                                                <td>{{item.typedata.number}}</td>
                                            </tr>
                                            <tr>
                                                <td>开单员</td>
                                                <td>{{item.typedata.create_name}}</td>
                                            </tr>
                                            <tr>
                                                <td>开单时间</td>
                                                <td>{{item.typedata.pay_day_date}}</td>
                                            </tr>
                                            <tr>
                                                <td>存入账号</td>
                                                <td>
                                                    {{item.typedata.bill_banknumber}}<br>
                                                    {{item.typedata.bill_bankname}}
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </button>
                        </td>
                        <td>
                            <span v-if="item.paytype_id==1">现金</span>
                            <!--转账-->
                            <span v-if="item.paytype_id==5"> {{item.typedata.account_banknumber?item.typedata.account_banknumber:'-'}}<br>
                                                {{item.typedata.account_bankname}}</span>
                            <!--银行单-->
                            <span v-if="item.paytype_id==6"> {{item.typedata.bill_banknumber?item.typedata.bill_banknumber:'-'}}<br>
                                                {{item.typedata.bill_bankname}}</span>
                            <!--支票-->
                            <span v-if="item.paytype_id==3 || item.paytype_id==4">{{item.typedata.accountnumber?item.typedata.accountnumber:'-'}}<br>
                                                {{item.typedata.accountname}}</span>
                        </td>
                        <td align="right" :class="item.class">
                            {{formatUnit(item.amount,'BRL')}}
                            <small class="unit">BRL</small>
                            <br>
                            <span :class="item.class">{{formatUnit(item.amount/item.pay*100,'%')}}</span>
                            <small class="unit">%</small>
                        </td>
                        <td>{{item.saler_name}}</td>
                        <td>{{item.managename}}<br>
                            <small>{{item.update_date}}</small>
                        </td>
                        <td>
                            <button @mouseover="setpopper" v-if="item.remark.length>0" class="btn btn-sm btn-default"
                                    data-toggle="popover" title="付款登记（8888）备注">
                                备注
                                <div class="content">
                                    <div style="width:30vw">
                                        <ul>
                                            <li v-for="remarkname in item.remark" :key="remarkname.id">
                                                {{remarkname.remark}}
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </button>
                        </td>
                        <td align="right">
                            <!--表示这笔订单已经收到-->
                            <button v-if="adminauth_ids.indexOf(249)!=-1" @click="achieve(item.saleid,1,item.id)"
                                    class="btn btn-sm btn-primary" data-toggle="modal" data-target="#pay_confirmModal">
                                已收到
                            </button>

                            <!--表示这笔订单没有收到-->
                            <button v-if="adminauth_ids.indexOf(250)!=-1" @click="achieve(item.saleid,2,item.id)"
                                    class="btn btn-sm btn-default" data-toggle="modal" data-target="#pay_confirmModal">
                                未收到
                            </button>
                        </td>
                    </tr>
                    <tr style="text-align: center;" v-if="list.length==0">
                        <td colspan="13" class="no_date">{:strtoupper(lang('no_data'))}</td>
                    </tr>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="13" align="right">列表金额合计: {{formatUnit(sumcount,'BRL')}}
                            <small class="unit">BRL</small>
                        </td>
                    </tr>
                    </tfoot>
                </table>
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <ul class="pagination" id="paginationone" v-show="list.length!=0">
                        </ul>
                    </div>
                </div>
            </div>

            <!-- 财务 收款完成 列表 -->

            <div class="col-md-12 tab-pane" id="finish">
                <div class="row" style="padding-top: 1rem">
                    <div class="col-md-6">
                        <ul class="nav nav-tabs">
                            <li class="active" @click="paytype('11')"><a href="#">全部</a></li>
                            <li><a href="#" @click="paytype('1')">现金</a></li>
                            <li><a href="#" @click="paytype('3')">支票</a></li>
                            <li><a href="#" @click="paytype('5')">转账</a></li>
                            <li><a href="#" @click="paytype('6')">银行单</a></li>
                        </ul>
                    </div>
                    <div class="col-md-6">
                        <div class="text-right">
                            <ul class="pagination" style="margin:10px 0;" v-cloak>
                                <li @click="changedate(-1)"><a href="javascript:;">&laquo;</a></li>
                                <li :class="{active:index==0}" v-for="(item,index) in date"
                                    @click="changedate(index,true)"><a
                                        href="javascript:;">{{item.splyear+'-'+item.month}}</a></li>
                                <li @click="changedate(1)"><a href="javascript:;">&raquo;</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-striped table-hover ntTable">
                            <thead>
                            <tr>
                                <th width="4%"> 订单号</th>
                                <th width="25%"> 公司</th>
                                <th> 应收金额</th>
                                <th> 定金</th>
                                <th> 收款日期</th>
                                <th class="sorting"> 付款方式</th>
                                <th class="sorting"> 收款账号</th>
                                <th>金额</th>
                                <th class="sorting"> 会计</th>
                                <th> 备注</th>
                                <th> 操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(item,index) in list" :key="item.id">
                                <td><span v-if="item.sale_id">{{formatUnit(item.sale_id,'ID')}}</span></td>
                                <td><span v-if="item.sale_id">{{item.company_name}}</span></td>
                                <td align="right"><span v-if="item.sale_id">{{formatUnit(item.pay,'BRL')}}<small class="unit">BRL</small></span>
                                </td>
                                <td align="center"><span v-if="item.sale_id">{{item.pledge=='1'?'O':'-'}}</span></td>
                                <td>{{item.pay_date}}</td>
                                <td>
                                    <!--现金-->
                                    <span v-if="item.paytype_id==1">{{item.paytype_name}}</span>
                                    <!--支票-->
                                    <button v-if="item.paytype_id==3 || item.paytype_id==4" @mouseover="setpopper"
                                            class="btn btn-sm btn-default"
                                            data-toggle="popover"
                                            placement="right" title="支票详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td width="25%">开票银行</td>
                                                        <td>{{item.typedata.bank_name}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>支票号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>支票署名</td>
                                                        <td>{{item.typedata.signature}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>付款日期</td>
                                                        <td>{{item.typedata.pay_day_date}}</td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                    <!--转账-->
                                    <button v-if="item.paytype_id==5" @mouseover="setpopper"
                                            class="btn btn-sm btn-default"
                                            data-toggle="popover" placement="right" title="转账详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td width="25%">汇出账号</td>
                                                        <td>
                                                            {{item.typedata.co_banknumber}} <br>
                                                            {{item.typedata.co_bankname}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>流水号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>存入账号</td>
                                                        <td>
                                                            {{item.typedata.account_banknumber}}<br>
                                                            {{item.typedata.account_bankname}}
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                    <!--银行单-->
                                    <button v-if="item.paytype_id==6" @mouseover="setpopper" class="btn btn-sm btn-default" data-toggle="popover" placement="right" title="银行单详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td>银行单号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>开单员</td>
                                                        <td>{{item.typedata.create_name}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>开单时间</td>
                                                        <td>{{item.typedata.pay_day_date}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>存入账号</td>
                                                        <td>
                                                            {{item.typedata.bill_banknumber}}<br>
                                                            {{item.typedata.bill_bankname}}
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                </td>
                                <td>
                                    <span v-if="item.paytype_id==1">现金</span>
                                    <!--转账-->
                                    <span v-if="item.paytype_id==5"> {{item.typedata.account_banknumber?item.typedata.account_banknumber:'-'}}<br>
                                                {{item.typedata.account_bankname}}</span>

                                    <!--银行单-->
                                    <span v-if="item.paytype_id==6"> {{item.typedata.bill_banknumber?item.typedata.bill_banknumber:'-'}}<br>
                                                {{item.typedata.bill_bankname}}</span>
                                    <!--支票-->
                                    <span v-if="item.paytype_id==3 || item.paytype_id==4">{{item.typedata.accountnumber?item.typedata.accountnumber:'-'}}<br>
                                                {{item.typedata.accountname}}</span>
                                </td>
                                <td align="right" :class="item.class">
                                    {{formatUnit(item.amount,'BRL')}}
                                    <small class="unit">BRL</small>
                                    <br>
                                    <span :class="item.class">{{formatUnit(item.amount/item.pay*100,'%')}}</span>
                                    <small class="unit">%</small>
                                </td>
                                <!--确认人和确认成功时间 包括失败的-->
                                <td> {{item.check_name}}<br>{{item.succes_fail_date}}</td>
                                <td>
                                    <button @mouseover="setpopper" v-if="item.remark.length>0" class="btn btn-sm btn-default"
                                            data-toggle="popover" title="付款登记（8888）备注">
                                        备注
                                        <div class="content">
                                            <div style="width:30vw">
                                                <ul>
                                                    <li v-for="remarkname in item.remark" :key="remarkname.id">
                                                        {{remarkname.remark}}
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </button>
                                </td>
                                <td align="right">
                                    <button v-if="adminauth_ids.indexOf(251)!=-1" @click="achieve(item.saleid,3,item.id)"
                                            class="btn btn-sm btn-default" data-toggle="modal"
                                            data-target="#payreg_viewModal">查看
                                    </button>
                                    <!--取消收账在8小时以内就无法取消-->
                                    <button  v-if="(adminauth_ids.indexOf(253)!=-1&& item.time-item.success_at < 28800) ||(adminauth_ids.indexOf(253)!=-1&& item.time-item.fail_at < 28800) || adminauth_ids.indexOf(401)!=-1" @click="huifucancel(item.id,item.saleid,2)"
                                    class="btn btn-sm btn-default">取消收账
                                    </button>


                                </td>
                            </tr>
                            <tr style="text-align: center;" v-if="list.length==0">
                                <td colspan="11" class="no_date">{:strtoupper(lang('no_data'))}</td>
                            </tr>
                            </tbody>
                        </table>
                        <div class="row clearfix">
                            <div class="col-md-12 column">
                                <ul class="pagination" id="paginationtwo" v-show="list.length!=0">
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <!-- 财务 收款确认 逾期列表 -->

            <div class="col-md-12 tab-pane" id="timeout">
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-striped table-hover ntTable">
                            <thead>
                            <tr>
                                <th width="4%"> 订单号</th>
                                <th width="25%" class="sorting"> 公司</th>
                                <th> 应收金额</th>
                                <th> 定金</th>
                                <th> 收款日期</th>
                                <th class="sorting"> 付款方式</th>
                                <th class="sorting"> 收款账号</th>
                                <th>金额</th>
                                <th> 备注</th>
                                <th> 操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(item,index) in list" :key="item.id">
                                <td><span v-if="item.sale_id">{{formatUnit(item.sale_id,'ID')}}</span></td>
                                <td><span v-if="item.sale_id">{{item.company_name}}</span></td>
                                <td align="right"><span v-if="item.sale_id">{{formatUnit(item.pay,'BRL')}}<small class="unit">BRL</small></span>
                                </td>
                                <td align="center"><span v-if="item.sale_id">{{item.pledge=='1'?'O':'-'}}</span></td>
                                <td>{{item.pay_date}}</td>
                                <td>
                                    <!--现金-->
                                    <span v-if="item.paytype_id==1">{{item.paytype_name}}</span>
                                    <!--支票-->
                                    <button v-if="item.paytype_id==3 || item.paytype_id==4" @mouseover="setpopper"
                                            class="btn btn-sm btn-default"
                                            data-toggle="popover"
                                            placement="right" title="支票详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td width="25%">开票银行</td>
                                                        <td>{{item.typedata.bank_name}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>支票号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>支票署名</td>
                                                        <td>{{item.typedata.signature}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>付款日期</td>
                                                        <td>{{item.typedata.pay_day_date}}</td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                    <!--转账-->
                                    <button v-if="item.paytype_id==5" @mouseover="setpopper"
                                            class="btn btn-sm btn-default"
                                            data-toggle="popover" placement="right" title="转账详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td width="25%">汇出账号</td>
                                                        <td>
                                                            {{item.typedata.co_banknumber}} <br>
                                                            {{item.typedata.co_bankname}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>流水号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>存入账号</td>
                                                        <td>
                                                            {{item.typedata.account_banknumber}}<br>
                                                            {{item.typedata.account_bankname}}
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                    <!--银行单-->
                                    <button v-if="item.paytype_id==6" @mouseover="setpopper" class="btn btn-sm btn-default" data-toggle="popover" placement="right" title="银行单详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td>银行单号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>开单员</td>
                                                        <td>{{item.typedata.create_name}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>开单时间</td>
                                                        <td>{{item.typedata.pay_day_date}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>存入账号</td>
                                                        <td>
                                                            {{item.typedata.bill_banknumber}}<br>
                                                            {{item.typedata.bill_bankname}}
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                </td>
                                <td>
                                    <span v-if="item.paytype_id==1">现金</span>
                                    <!--转账-->
                                    <span v-if="item.paytype_id==5"> {{item.typedata.account_banknumber?item.typedata.account_banknumber:'-'}}<br>
                                                {{item.typedata.account_bankname}}</span>

                                    <!--银行单-->
                                    <span v-if="item.paytype_id==6"> {{item.typedata.bill_banknumber?item.typedata.bill_banknumber:'-'}}<br>
                                                {{item.typedata.bill_bankname}}</span>
                                    <!--支票-->
                                    <span v-if="item.paytype_id==3 || item.paytype_id==4">{{item.typedata.accountnumber?item.typedata.accountnumber:'-'}}<br>
                                                {{item.typedata.accountname}}</span>
                                </td>
                                <td align="right" :class="item.class">
                                    {{formatUnit(item.amount,'BRL')}}
                                    <small class="unit">BRL</small>
                                    <br>
                                    <span :class="item.class">{{formatUnit(item.amount/item.pay*100,'%')}}</span>
                                    <small class="unit">%</small>
                                </td>
                                <td>
                                    <button @mouseover="setpopper" v-if="item.remark.length>0" class="btn btn-sm btn-default"
                                            data-toggle="popover" title="付款登记（8888）备注">
                                        备注
                                        <div class="content">
                                            <div style="width:30vw">
                                                <ul>
                                                    <li v-for="remarkname in item.remark" :key="remarkname.id">
                                                        {{remarkname.remark}}
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </button>
                                </td>
                                <td align="right">
                                    <button v-if="adminauth_ids.indexOf(251)!=-1"  @click="achieve(item.saleid,3,item.id)"
                                            class="btn btn-sm btn-default" data-toggle="modal"
                                            data-target="#payreg_viewModal">查看
                                    </button>

                                    <!--表示这笔订单已经收到-->
                                    <button v-if="adminauth_ids.indexOf(249)!=-1"  @click="achieve(item.saleid,1,item.id)"
                                             class="btn btn-sm btn-primary" data-toggle="modal" data-target="#pay_confirmModal">
                                        已收到
                                    </button>

                                    <!--表示这笔订单没有收到-->
                                    <button v-if="adminauth_ids.indexOf(250)!=-1" @click="achieve(item.saleid,2,item.id)"
                                            class="btn btn-sm btn-default" data-toggle="modal" data-target="#pay_confirmModal">
                                        未收到
                                    </button>

                                </td>
                            </tr>
                            <tr style="text-align: center;" v-if="list.length==0">
                                <td colspan="10" class="no_date">{:strtoupper(lang('no_data'))}</td>
                            </tr>
                            </tbody>
                        </table>
                        <div class="row clearfix">
                            <div class="col-md-12 column">
                                <ul class="pagination" id="paginationthree" v-show="list.length!=0">
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <!-- 财务 收款确认 坏账列表 -->

            <div class="col-md-12 tab-pane" id="fail">
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-striped table-hover ntTable">
                            <thead>
                            <tr>
                                <th width="4%"> 订单号</th>
                                <th width="25%" class="sorting"> 公司</th>
                                <th> 应收金额</th>
                                <th> 定金</th>
                                <th> 收款日期</th>
                                <th class="sorting"> 付款方式</th>
                                <th class="sorting"> 收款账号</th>
                                <th>金额</th>
                                <th> 确认会计</th>
                                <th> 备注</th>
                                <th> 操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(item,index) in list" :key="item.id">
                                <td><span v-if="item.sale_id">{{formatUnit(item.sale_id,'ID')}}</span></td>
                                <td><span v-if="item.sale_id">{{item.company_name}}</span></td>
                                <td align="right"><span v-if="item.sale_id">{{formatUnit(item.pay,'BRL')}}<small class="unit">BRL</small></span>
                                </td>
                                <td align="center"><span v-if="item.sale_id">{{item.pledge=='1'?'O':'-'}}</span></td>
                                <td>{{item.pay_date}}</td>
                                <td>
                                    <!--现金-->
                                    <span v-if="item.paytype_id==1">{{item.paytype_name}}</span>
                                    <!--支票-->
                                    <button v-if="item.paytype_id==3 || item.paytype_id==4" @mouseover="setpopper"
                                            class="btn btn-sm btn-default"
                                            data-toggle="popover"
                                            placement="right" title="支票详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td width="25%">开票银行</td>
                                                        <td>{{item.typedata.bank_name}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>支票号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>支票署名</td>
                                                        <td>{{item.typedata.signature}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>付款日期</td>
                                                        <td>{{item.typedata.pay_day_date}}</td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                    <!--转账-->
                                    <button v-if="item.paytype_id==5" @mouseover="setpopper"
                                            class="btn btn-sm btn-default"
                                            data-toggle="popover" placement="right" title="转账详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td width="25%">汇出账号</td>
                                                        <td>
                                                            {{item.typedata.co_banknumber}} <br>
                                                            {{item.typedata.co_bankname}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>流水号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>存入账号</td>
                                                        <td>
                                                            {{item.typedata.account_banknumber}}<br>
                                                            {{item.typedata.account_bankname}}
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                    <!--银行单-->
                                    <button v-if="item.paytype_id==6" @mouseover="setpopper" class="btn btn-sm btn-default" data-toggle="popover" placement="right" title="银行单详情">
                                        {{item.paytype_name}}
                                        <div class="content">
                                            <div style="width:25vw">
                                                <table class="table">
                                                    <tbody>
                                                    <tr>
                                                        <td>银行单号</td>
                                                        <td>{{item.typedata.number}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>开单员</td>
                                                        <td>{{item.typedata.create_name}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>开单时间</td>
                                                        <td>{{item.typedata.pay_day_date}}</td>
                                                    </tr>
                                                    <tr>
                                                        <td>存入账号</td>
                                                        <td>
                                                            {{item.typedata.bill_banknumber}}<br>
                                                            {{item.typedata.bill_bankname}}
                                                        </td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </button>
                                </td>
                                <td>
                                    <span v-if="item.paytype_id==1">现金</span>
                                    <!--转账-->
                                    <span v-if="item.paytype_id==5"> {{item.typedata.account_banknumber?item.typedata.account_banknumber:'-'}}<br>
                                                {{item.typedata.account_bankname}}</span>

                                    <!--银行单-->
                                    <span v-if="item.paytype_id==6"> {{item.typedata.bill_banknumber?item.typedata.bill_banknumber:'-'}}<br>
                                                {{item.typedata.bill_bankname}}</span>
                                    <!--支票-->
                                    <span v-if="item.paytype_id==3 || item.paytype_id==4">{{item.typedata.accountnumber?item.typedata.accountnumber:'-'}}<br>
                                                {{item.typedata.accountname}}</span>
                                </td>
                                <td align="right" :class="item.class">
                                    {{formatUnit(item.amount,'BRL')}}
                                    <small class="unit">BRL</small>
                                    <br>
                                    <span :class="item.class">{{formatUnit(item.amount/item.pay*100,'%')}}</span>
                                    <small class="unit">%</small>
                                </td>
                                <td>
                                    <!--确认支付人和支付失败时间-->
                                    {{item.check_name}}<br>
                                    {{item.fail_date}}
                                </td>
                                <td>
                                    <button @mouseover="setpopper" v-if="item.remark.length>0" class="btn btn-sm btn-default"
                                            data-toggle="popover" title="付款登记（8888）备注">
                                        备注
                                        <div class="content">
                                            <div style="width:30vw">
                                                <ul>
                                                    <li v-for="remarkname in item.remark" :key="remarkname.id">
                                                        {{remarkname.remark}}
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </button>
                                </td>
                                <td align="right">
                                    <button v-if="adminauth_ids.indexOf(251)!=-1" @click="achieve(item.saleid,3,item.id)"
                                            class="btn btn-sm btn-default" data-toggle="modal"
                                            data-target="#payreg_viewModal">查看
                                    </button>
                                    <!--坏账中的恢复24小时以内的坏账-->
                                    <button v-if="(adminauth_ids.indexOf(252)!=-1&& item.time-item.fail_at < 86400) || adminauth_ids.indexOf(402)!=-1" class="btn btn-sm btn-primary"  @click="huifucancel(item.id,item.saleid,1)">恢复</button>
                                </td>
                            </tr>
                            <tr style="text-align: center;" v-if="list.length==0">
                                <td colspan="11" class="no_date">{:strtoupper(lang('no_data'))}</td>
                            </tr>
                            </tbody>
                        </table>
                        <div class="row clearfix">
                            <div class="col-md-12 column">
                                <ul class="pagination" id="paginationfour" v-show="list.length!=0">
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 销售财务 收到和未收到按钮 弹窗开始 -->
    <div class="modal fade" id="pay_confirmModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:80%">
            <form class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title">订单（8888）收款确认</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="row clearfix">
                            <div class="col-md-12 column">
                                <div class="alert alert-dismissable alert-info">
                                    <button type="button" class="close">×</button>
                                    <p></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-4">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a href="#confirm_payreg" data-toggle="tab">付款登记</a>
                                </li>
                                <li>
                                    <a href="#confirm_payplan" data-toggle="tab">订单内容</a>
                                </li>
                            </ul>
                        </div>
                        <div class="col-md-1"><span class="gray">销售单号</span><br>{{formatUnit(achievecode.saledata.sale_id,'ID')}}</div>
                        <div class="col-md-6"><span class="gray">公司</span><br>{{achievecode.saledata.company_name}}
                        </div>
                        <div class="col-md-1"><span class="gray">定金</span><br>{{achievecode.saledata.pledge}}</div>
                        <input type="hidden" :value="achievecode.saledata.company_id" id="company_id">
                    </div>
                    <div class="row">
                        <div class="col-md-12 tab-content">
                            <div class="tab-pane active" id="confirm_payreg">
                                <!-- 付款登记 -->
                                <table class="table table-striped table-hover ntTable">
                                    <thead>
                                    <tr>
                                        <th>登记号</th>
                                        <th></th>
                                        <th> 收款日期</th>
                                        <th> 付款方式</th>
                                        <th> 收款账号</th>
                                        <th> 金额</th>
                                        <th> 确认</th>
                                        <th> 编辑</th>
                                        <th> 备注</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr v-for="item in achievecode.salepayreg" :key="item.id">
                                        <td>{{formatUnit(item.id,'ID')}}</td>
                                        <td>
                                            <input :value="item.id" v-model="achievecode.batch" type="checkbox" v-if="item.checks==1"
                                                   @click="onesel(item.id,item.amount)">
                                        </td>
                                        <td>{{item.pay_date}}</td>
                                        <td>
                                            <!--现金-->
                                            <span v-if="item.paytype_id==1">{{item.paytype_name}}</span>
                                            <!--支票-->
                                            <button v-if="item.paytype_id==3 || item.paytype_id==4" @mouseover="setpopper"
                                                    class="btn btn-sm btn-default"
                                                    data-toggle="popover"
                                                    placement="right" title="支票详情">
                                                {{item.paytype_name}}
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <table class="table">
                                                            <tbody>
                                                            <tr>
                                                                <td width="25%">开票银行</td>
                                                                <td>{{item.typedata.bank_name}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>支票号</td>
                                                                <td>{{item.typedata.number}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>支票署名</td>
                                                                <td>{{item.typedata.signature}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>付款日期</td>
                                                                <td>{{item.typedata.pay_day_date}}</td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </button>
                                            <!--转账-->
                                            <button v-if="item.paytype_id==5" @mouseover="setpopper"
                                                    class="btn btn-sm btn-default"
                                                    data-toggle="popover" placement="right" title="转账详情">
                                                {{item.paytype_name}}
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <table class="table">
                                                            <tbody>
                                                            <tr>
                                                                <td width="25%">汇出账号</td>
                                                                <td>
                                                                    {{item.typedata.co_banknumber}} <br>
                                                                    {{item.typedata.co_bankname}}
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>流水号</td>
                                                                <td>{{item.typedata.number}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>存入账号</td>
                                                                <td>
                                                                    {{item.typedata.account_banknumber}}<br>
                                                                    {{item.typedata.account_bankname}}
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </button>
                                            <!--银行单-->
                                            <button v-if="item.paytype_id==6" @mouseover="setpopper" class="btn btn-sm btn-default" data-toggle="popover" placement="right" title="银行单详情">
                                                {{item.paytype_name}}
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <table class="table">
                                                            <tbody>
                                                            <tr>
                                                                <td>银行单号</td>
                                                                <td>{{item.typedata.number}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>开单员</td>
                                                                <td>{{item.typedata.create_name}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>开单时间</td>
                                                                <td>{{item.typedata.pay_day_date}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>存入账号</td>
                                                                <td>
                                                                    {{item.typedata.bill_banknumber}}<br>
                                                                    {{item.typedata.bill_bankname}}
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </button>
                                        </td>
                                        <td>
                                            <span v-if="item.paytype_id==1">现金</span>
                                            <!--转账-->
                                            <span v-if="item.paytype_id==5"> {{item.typedata.account_banknumber?item.typedata.account_banknumber:'-'}}<br>
                                                {{item.typedata.account_bankname}}</span>

                                            <!--银行单-->
                                            <span v-if="item.paytype_id==6"> {{item.typedata.bill_banknumber?item.typedata.bill_banknumber:'-'}}<br>
                                                {{item.typedata.bill_bankname}}</span>
                                            <!--支票-->
                                            <span v-if="item.paytype_id==3 || item.paytype_id==4">{{item.typedata.accountnumber?item.typedata.accountnumber:'-'}}<br>
                                                {{item.typedata.accountname}}</span>
                                        </td>
                                        <td align="right"><span
                                                :class="item.class">{{formatUnit(item.amount,'BRL')}}</span>
                                            <small class="unit">BRL</small>
                                        </td>
                                        <!--确认者-->
                                        <td>{{item.check_name}}<br>
                                            <small>{{item.success_fail_date}}</small>
                                        </td>
                                        <!--编辑者-->
                                        <td>{{item.managename}}<br>
                                            <small>{{item.update_date}}</small>
                                        </td>
                                        <td>
                                            <button @mouseover="setpopper" v-if="item.remark.length>0"
                                                    class="btn btn-sm btn-default" data-toggle="popover"
                                                    title="付款登记（8888）备注">
                                                备注
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <ul>
                                                            <li v-for="remarkname in item.remark" :key="remarkname.id">
                                                                {{remarkname.remark}}
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td colspan="10" align="right">
                                            列表登记金额合计: {{formatUnit(achievecode.saledata.dengjipay,'BRL')}}
                                            <small class="unit">BRL</small>
                                            /
                                            已收金额: {{formatUnit(achievecode.saledata.alreadypay,'BRL')}}
                                            <small class="unit">BRL</small>
                                            /
                                            未确认金额: {{formatUnit(achievecode.saledata.nopay,'BRL')}}
                                            <small class="unit">BRL</small>
                                            /
                                            选择金额: {{formatUnit(checkmoney,'BRL')}}
                                            <small class="unit">BRL</small>
                                            /
                                            坏帐金额:{{formatUnit(achievecode.saledata.huaipay,'BRL')}}
                                            <small class="unit">BRL</small>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                            <div class="tab-pane" id="confirm_payplan">
                                <div class="col-md-4" style="padding:0.5rem 0 0 0;margin: 0">
                                    <!-- 订单信息 -->
                                    <table class="table table-striped table-hover ntTable">
                                        <tbody>
                                        <tr>
                                            <td>发票号</td>
                                            <td colspan="2">{{achievecode.saledata.fapiaonum}}</td>
                                        </tr>
                                        <tr>
                                            <td>开票员</td>
                                            <td>{{achievecode.saledata.drawername}}</td>
                                            <td>{{achievecode.saledata.drawertime}}</td>
                                        </tr>
                                        <tr>
                                            <td>应付金额</td>
                                            <td colspan="2" align="right">
                                                {{formatUnit(achievecode.saledata.pay,'BRL')}}
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>登记金额</td>
                                            <td colspan="2" align="right">
                                                <span class="blue">{{formatUnit(achievecode.saledata.dengjipay,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>到账金额</td>
                                            <td colspan="2" align="right">
                                                <span class="green">{{formatUnit(achievecode.saledata.alreadypay,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>剩余金额</td>
                                            <td colspan="2" align="right">
                                                <span class="orange">{{formatUnit(achievecode.saledata.nopay,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>业务</td>
                                            <td>{{achievecode.saledata.saler_name}}</td>
                                            <td>-</td>
                                        </tr>
                                        <tr>
                                            <td>开单</td>
                                            <td>{{achievecode.saledata.drawuser_create}}</td>
                                            <td>{{achievecode.saledata.drawdate_time_create}}</td>
                                        </tr>
                                        <tr>
                                            <td>更新</td>
                                            <td>{{achievecode.saledata.drawuser_update}}</td>
                                            <td>{{achievecode.saledata.drawdate_time_update}}</td>
                                        </tr>
                                        <tr>
                                            <td>送货方式</td>
                                            <td>{{achievecode.saledata.delivergoods}}</td>
                                            <td>-</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="col-md-8" style="padding:0.5rem 0 0 1rem;margin: 0">
                                    <!-- 付款安排 -->
                                    <table class="table table-striped table-hover ntTable">
                                        <thead>
                                        <tr>
                                            <td>#</td>
                                            <td>付款日期</td>
                                            <td>付款方式</td>
                                            <td>金额</td>
                                            <td>编辑</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="(item ,index) in achievecode.salepayreg" :key="item.id">
                                            <td align="center">{{index+1}}</td>
                                            <td>{{item.pay_date}}</td>
                                            <td>{{item.paytype_name}}</td>
                                            <td align="right"><span :class="item.class">{{formatUnit(item.amount,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                            <td>{{item.managename}} / {{item.update_date}}</td>
                                        </tr>
                                        <tr style="text-align: center;" v-if="achievecode.salepayreg.length==0">
                                            <td colspan="5" class="no_date">{:strtoupper(lang('no_data'))}</td>
                                        </tr>
                                        </tbody>
                                        <tfoot>
                                        <tr>
                                            <td colspan="10" align="right">
                                                金额合计: {{formatUnit(achievecode.saledata.dengjipay,'BRL')}}
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal-footer" v-if="achievecode.saledata.code==1">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>取消
                    </button>
                    <button type="button" class="btn btn-primary" @click="savebtn(2)"
                            style="padding-left:24px;padding-right:24px"><span
                            class="glyphicon glyphicon-floppy-disk"></span>确认款已收到
                    </button>
                </div>

                <div class="modal-footer" v-if="achievecode.saledata.code==2">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>取消
                    </button>
                    <button @click="savebtn(1)" type="button" class="btn btn-danger"
                            style="padding-left:24px;padding-right:24px"><span class="fa fa-window-close"></span>确认金额没有到账
                    </button>
                </div>

            </form>
        </div>
    </div>
    <!-- 销售财务 订单查看 弹窗开始 -->
    <div class="modal fade" id="payreg_viewModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:80%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title">订单（8888）收款查看</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="row clearfix">
                            <div class="col-md-12 column">
                                <div class="alert alert-dismissable alert-info">
                                    <button type="button" class="close">×</button>
                                    <p></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-4">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a href="#view_payreg" data-toggle="tab">付款登记</a>
                                </li>
                                <li>
                                    <a href="#view_payplan" data-toggle="tab">订单内容</a>
                                </li>
                            </ul>
                        </div>
                        <div class="col-md-1"><span class="gray">销售单号</span><br>{{formatUnit(achievecode.saledata.sale_id,'ID')}}</div>
                        <div class="col-md-6"><span class="gray">公司</span><br>{{achievecode.saledata.company_name}}
                        </div>
                        <div class="col-md-1"><span class="gray">定金</span><br>{{achievecode.saledata.pledge}}</div>
                    </div>
                    <div class="row">
                        <div class="col-md-12 tab-content">
                            <div class="tab-pane active" id="view_payreg">
                                <!-- 付款登记 -->
                                <table class="table table-striped table-hover ntTable">
                                    <thead>
                                    <tr>
                                        <th>登记号</th>
                                        <th>收款日期</th>
                                        <th>付款方式</th>
                                        <th>收款账号</th>
                                        <th>金额</th>
                                        <th>财务确认</th>
                                        <th>编辑</th>
                                        <th>备注</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr v-for="item in achievecode.salepayreg" :key="item.id">
                                        <td>{{formatUnit(item.id,'ID')}}</td>
                                        <td>{{item.pay_date}}</td>
                                        <td>
                                            <!--现金-->
                                            <span v-if="item.paytype_id==1">{{item.paytype_name}}</span>
                                            <!--支票-->
                                            <button v-if="item.paytype_id==3 || item.paytype_id==4" @mouseover="setpopper"
                                                    class="btn btn-sm btn-default"
                                                    data-toggle="popover"
                                                    placement="right" title="支票详情">
                                                {{item.paytype_name}}
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <table class="table">
                                                            <tbody>
                                                            <tr>
                                                                <td width="25%">开票银行</td>
                                                                <td>{{item.typedata.bank_name}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>支票号</td>
                                                                <td>{{item.typedata.number}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>支票署名</td>
                                                                <td>{{item.typedata.signature}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>付款日期</td>
                                                                <td>{{item.typedata.pay_day_date}}</td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </button>
                                            <!--转账-->
                                            <button v-if="item.paytype_id==5" @mouseover="setpopper"
                                                    class="btn btn-sm btn-default"
                                                    data-toggle="popover" placement="right" title="转账详情">
                                                {{item.paytype_name}}
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <table class="table">
                                                            <tbody>
                                                            <tr>
                                                                <td width="25%">汇出账号</td>
                                                                <td>
                                                                    {{item.typedata.co_banknumber}} <br>
                                                                    {{item.typedata.co_bankname}}
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>流水号</td>
                                                                <td>{{item.typedata.number}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>存入账号</td>
                                                                <td>
                                                                    {{item.typedata.account_banknumber}}<br>
                                                                    {{item.typedata.account_bankname}}
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </button>
                                            <!--银行单-->
                                            <button v-if="item.paytype_id==6" @mouseover="setpopper" class="btn btn-sm btn-default" data-toggle="popover" placement="right" title="银行单详情">
                                                {{item.paytype_name}}
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <table class="table">
                                                            <tbody>
                                                            <tr>
                                                                <td>银行单号</td>
                                                                <td>{{item.typedata.number}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>开单员</td>
                                                                <td>{{item.typedata.create_name}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>开单时间</td>
                                                                <td>{{item.typedata.pay_day_date}}</td>
                                                            </tr>
                                                            <tr>
                                                                <td>存入账号</td>
                                                                <td>
                                                                    {{item.typedata.bill_banknumber}}<br>
                                                                    {{item.typedata.bill_bankname}}
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </button>
                                        </td>
                                        <td>
                                            <span v-if="item.paytype_id==1">现金</span>
                                            <!--转账-->
                                            <span v-if="item.paytype_id==5"> {{item.typedata.account_banknumber?item.typedata.account_banknumber:'-'}}<br>
                                                {{item.typedata.account_bankname}}</span>

                                            <!--银行单-->
                                            <span v-if="item.paytype_id==6"> {{item.typedata.bill_banknumber?item.typedata.bill_banknumber:'-'}}<br>
                                                {{item.typedata.bill_bankname}}</span>
                                            <!--支票-->
                                            <span v-if="item.paytype_id==3 || item.paytype_id==4">{{item.typedata.accountnumber?item.typedata.accountnumber:'-'}}<br>
                                                {{item.typedata.accountname}}</span>
                                        </td>
                                        <td align="right"><span
                                                :class="item.class">{{formatUnit(item.amount,'BRL')}}</span>
                                            <small class="unit">BRL</small>
                                        </td>
                                        <td>
                                            {{item.check_name}}<br>
                                            <small>{{item.success_fail_date}}</small>
                                        </td>
                                        <td>{{item.managename}}<br>
                                            <small>{{item.update_date}}</small>
                                        </td>
                                        <td>
                                            <button @mouseover="setpopper" v-if="item.remark.length>0"
                                                    class="btn btn-sm btn-default" data-toggle="popover"
                                                    title="付款登记（8888）备注">
                                                备注
                                                <div class="content">
                                                    <div style="width:25vw">
                                                        <ul>
                                                            <li v-for="remarkname in item.remark" :key="remarkname.id">
                                                                {{remarkname.remark}}
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr style="text-align: center;" v-if="achievecode.salepayreg.length==0">
                                        <td colspan="8" class="no_date">{:strtoupper(lang('no_data'))}</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td colspan="9" align="right">
                                            列表登记金额合计: {{formatUnit(achievecode.saledata.dengjipay,'BRL')}}
                                            <small class="unit">BRL</small>
                                            /
                                            已收合计: {{formatUnit(achievecode.saledata.alreadypay,'BRL')}}
                                            <small class="unit">BRL</small>
                                            /
                                            未付合计: {{formatUnit(achievecode.saledata.nopay,'BRL')}}
                                            <small class="unit">BRL</small>
                                            /
                                            坏帐合计:{{formatUnit(achievecode.saledata.huaipay,'BRL')}}
                                            <small class="unit">BRL</small>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                            <div class="tab-pane" id="view_payplan">
                                <div class="col-md-4" style="padding:0.5rem 0 0 0;margin: 0">
                                    <!-- 订单信息 -->
                                    <table class="table table-striped table-hover ntTable">
                                        <tbody>
                                        <tr>
                                            <td>发票号</td>
                                            <td colspan="2">{{achievecode.saledata.fapiaonum}}</td>
                                        </tr>
                                        <tr>
                                            <td>开票员</td>
                                            <td>{{achievecode.saledata.drawername}}</td>
                                            <td>{{achievecode.saledata.drawertime}}</td>
                                        </tr>
                                        <tr>
                                            <td>应付金额</td>
                                            <td colspan="2" align="right">
                                                {{formatUnit(achievecode.saledata.pay,'BRL')}}
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>登记金额</td>
                                            <td colspan="2" align="right">
                                                <span class="blue"> {{formatUnit(achievecode.saledata.dengjipay,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>到账金额</td>
                                            <td colspan="2" align="right">
                                                <span class="green">{{formatUnit(achievecode.saledata.alreadypay,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>剩余金额</td>
                                            <td colspan="2" align="right">
                                                <span class="orange">{{formatUnit(achievecode.saledata.nopay,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>业务</td>
                                            <td>{{achievecode.saledata.saler_name}}</td>
                                            <td>-</td>
                                        </tr>
                                        <tr>
                                            <td>开单</td>
                                            <td>{{achievecode.saledata.drawuser_create}}</td>
                                            <td>{{achievecode.saledata.drawdate_time_create}}</td>
                                        </tr>
                                        <tr>
                                            <td>更新</td>
                                            <td>{{achievecode.saledata.drawuser_update}}</td>
                                            <td>{{achievecode.saledata.drawdate_time_update}}</td>
                                        </tr>
                                        <tr>
                                            <td>送货方式</td>
                                            <td>{{achievecode.saledata.delivergoods}}</td>
                                            <td>-</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="col-md-8" style="padding:0.5rem 0 0 1rem;margin: 0">
                                    <!-- 付款安排 -->
                                    <table class="table table-striped table-hover ntTable">
                                        <thead>
                                        <tr>
                                            <td>#</td>
                                            <td>付款日期</td>
                                            <td>付款方式</td>
                                            <td>金额</td>
                                            <td>编辑</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr v-for="(item ,index) in achievecode.salepayreg" :key="item.id">
                                            <td align="center">{{index+1}}</td>
                                            <td>{{item.pay_date}}</td>
                                            <td>{{item.paytype_name}}</td>
                                            <td align="right"><span :class="item.class">{{formatUnit(item.amount,'BRL')}}</span>
                                                <small class="unit">BRL</small>
                                            </td>
                                            <td>{{item.managename}} / {{item.update_date}}</td>
                                        </tr>
                                        <tr style="text-align: center;" v-if="achievecode.salepayreg.length==0">
                                            <td colspan="5" class="no_date">{:strtoupper(lang('no_data'))}</td>
                                        </tr>
                                        </tbody>
                                        <tfoot>
                                        <tr>
                                            <td colspan="10" align="right">
                                                金额合计: {{formatUnit(achievecode.saledata.dengjipay,'BRL')}}
                                                <small class="unit">BRL</small>
                                            </td>
                                        </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>取消
                    </button>
                </div>
            </div>
        </div>
    </div>

</div>


{include file="public/foot"/}
<!-- InstanceEndEditable -->
<script>
    var table = new Vue({
        el: '#mainsale',
        data: {
            date: [],
            checkmoney: 0,
            current: {},
            code: '11',//已完成标签
            list: [],
            status: '1',
            page: '1',
            pageSize: 30,
            //头部数字
            countnum: {
                countnumone: '',
                countnumtwo: '',
                countnumthree: '',
                countnumfor: '',
                countnumfive: '',
                countnumsix: '',
                countnumseven:'',
            },
            dname: '',
            achievecode: {
                saledata: [],
                salepayreg: [],
                batch: [],//勾选的按钮
            },
            adminauth_ids:$('#adminauth_ids').text(),//用户当前页面的权限
        },
        //列表总金额
        computed: {
            sumcount(){
                var s = 0;
                this.list.forEach(e => {
                    s += e.amount;
                });
                return s;
            }
        },
        methods: {
            formatUnit: formatUnit,
            setPage(pageCurrent, pageSum, pagination) {
                //数据总条数
                var myPageCount = pageSum;
                //一页显示多少条
                var myPageSize = this.pageSize;
                //总页数
                var countindex = myPageCount % myPageSize > 0 ? (myPageCount / myPageSize) + 1 : (myPageCount / myPageSize);
                $.jqPaginator(pagination, {
                    totalPages: parseInt(countindex),
                    //最多显示多少页
                    visiblePages: 5,
                    //默认显示第几页
                    currentPage: pageCurrent,
                    first: '<li class="first"><a href="javascript:;">' + langcon.page_home + '</a></li>',
                    prev: '<li class="prev"><a href="javascript:;"><i class="arrow arrow2"></i>' + langcon.previous_page + '</a></li>',
                    next: '<li class="next"><a href="javascript:;">' + langcon.next_page + '<i class="arrow arrow3"></i></a></li>',
                    last: '<li class="last"><a href="javascript:;">' + langcon.last_page + '</a></li>',
                    page: '<li class="page"><a href="javascript:;">{{page}}</a></li>',
                    all: '<li class="page"><a href="javascript:;">' + myPageCount + ' / ' + this.page + 'PG , ' + this.pageSize + ' /PG</a></li>',
                    onPageChange: (num, type) => {
                        if (type == "change") {
                            this.page = num
                            this.getAllList()
                        }
                    }
                });
            },
            //数据所有获取
            getAllList(){
                $('.loding').show();
                $.ajax({
                    url: "/admin/finance/sales",
                    type: 'post',
                    data: {
                        status: this.status,//页面标签
                        getdata: '',//获取标志
                        dname: this.dname,//搜索
                        page: this.page,
                        pageSize: this.pageSize,
                        code: this.code,//已经完成标签
                        monthday: this.current.year + '-' + this.current.month,//已完成时间
                    },
                    dataType: "json",
                    success: (result) => {
                        $('.loding').hide();
                        let arr = [];
                        result.data.forEach(item => {
                            let index = $.inArray(item.sale_id, arr);
                            if (index >= 0) {
                                item.sale_id = '';
                            }
                            arr.push(item.sale_id);
                        })
                        this.list = result.data;
                        this.countnum.countnumone = result.arrcount.one;
                        this.countnum.countnumtwo = result.arrcount.two;
                        this.countnum.countnumthree = result.arrcount.three;
                        this.countnum.countnumfor = result.arrcount.four;
                        this.countnum.countnumfive = result.arrcount.five;
                        this.countnum.countnumsix = result.arrcount.sex;
                        this.countnum.countnumseven = result.arrcount.seven;
                        let pagination = '';
                        if (this.status == 1 || this.status == 2 || this.status == 3) {
                            pagination = '#paginationone';
                        } else if (this.status == 4) {
                            pagination = '#paginationtwo';
                        } else if (this.status == 5) {
                            pagination = '#paginationthree';
                        } else if (this.status == 6) {
                            pagination = '#paginationfour';
                        }else if (this.status == 7) {
                            pagination = '#paginationfive';
                        }
                        if (result.count){
                            $('.loding').hide()
                            this.setPage(parseInt(this.page), result.count, pagination)
                        }
                    }
                })
            },
            //查找
            render(){
                this.getAllList()
            },
            //标签切换
            changestatus(status){
                this.status = status;
                this.getAllList()
            },
            //隐藏需要隐藏的部分
            datapopover(){
                $.each($("[data-toggle='popover']"), (key, value) => {
                    $(value).find(".content").hide();

                })
            },
            //设置popper组件的配置
            setpopper(e){
                $(e.target).popover({
                    trigger: 'hover focus manual',
                    placement: ($(e.target).attr("placement") == undefined) ? 'left' : $(e.target).attr("placement"),
                    //placement:'left',
                    title: $(e.target).attr("title"),
                    html: 'true',
                    content: $(e.target).find(".content").html(),
                    animation: false
                });
            },
            //1已收到(按钮) 2未收到（按钮）3 查看
            achieve(sale_id, code,payregid){
                this.achievecode.batch=[];
                this.checkmoney=0;
                var requesturl=''
                if(code==1){
                    //已收到
                    requesturl='receiptyes';
                }else if(code=2){
                    //未收到
                    requesturl='receiptno';
                }else if(code==3){
                    //查看
                    requesturl='receiptcheck';
                }
                $.ajax({
                    url: "/admin/finance/"+requesturl,
                    type: 'post',
                    data: {
                        sale_id,
                        code,
                        payregid,
                    },
                    dataType: "json",
                    success: (result) => {
                        this.achievecode.saledata = result.saledata,//销售订单的数据
                            this.achievecode.salepayreg = result.data;
                        if(result.batch){
                            this.achievecode.batch.push(Number(result.batch.payregid))
                            this.checkmoney += result.batch.amount//选中的金额
                        }
                    }
                })
            },
            //点击未到账的保存按钮 1是确认取消 2确认到账
            savebtn(code){
                $.ajax({
                    url: "/admin/finance/sales",
                    type: 'post',
                    data: {
                        batch: this.achievecode.batch,
                        noaccount: code,
                        co_id:$('#company_id').val()
                    },
                    success: (result) => {
                        data = JSON.parse(result)
                        if (data.status != 1) {
                            change_mes_type('.modal-body .alert', data.status)
                            $('.modal-body .alert').show()
                            $('.modal-body .alert p').html('*' + data.msg + '<br>')
                        } else {
                            change_mes_type('#headeralert', data.status)
                            $('#headeralert').show()
                            $('#headeralert p').html('*' + data.msg + '<br>')
                            if (data.status == 1) {
                                this.getAllList();
                                this.achievecode.batch = []
                            }

                            $('#pay_confirmModal').modal('toggle')
                        }
                    }
                })
            },
            //勾选要付款登记
            onesel(id, amount) {
                if (this.achievecode.batch.indexOf(id) == -1) {
                    this.achievecode.batch.push(id)
                    this.checkmoney += amount//选中的金额
                } else {
                    this.achievecode.batch.splice(this.achievecode.batch.indexOf(id), 1)
                    this.checkmoney -= amount//选中的金额
                }
            },
            //已完成中标签切换
            paytype(code){
                this.code = code;
                this.getAllList();
            },
            //恢复按钮 点击取消收账的点击
            huifucancel(id, sale_id,code){
                var huifuquxiao='';
                if(code==1){
                    //恢复（坏账）
                    huifuquxiao='resumeaccount';
                }else if(code==2) {
                    //取消收帐 （已完成中的取消收帐）
                    huifuquxiao='cancelaccount';
                }else if(code==3){
                    //支票收到中的收到
                    huifuquxiao='receiveaccount';
                }else if(code==4){
                    //支票收到中的取消
                    huifuquxiao='removeaccount';
                }
                $.ajax({
                    url: "/admin/finance/"+huifuquxiao,
                    type: 'post',
                    data: {
                        id,
                        sale_id,
                    },
                    success: (result) => {
                        data = JSON.parse(result)
                        change_mes_type('#headeralert', data.status)
                        $('#headeralert').show()
                        $('#headeralert p').html('*' + data.msg + '<br>')
                        if (data.status == 1) {
                            this.getAllList()
                        }

                    }
                })
            },
            changedate(index){
                this.current = this.date[index]
                if (index >= 0) {
                    this.date[0] = JSON.parse(JSON.stringify(this.date[index]))
                    this.current = JSON.parse(JSON.stringify(this.date[0]))
                    var time = JSON.parse(JSON.stringify(this.date[0]))
                } else {
                    var time = JSON.parse(JSON.stringify(this.date[0]))
                    if (time.month + 1 == 13) {
                        time.year++
                        time.splyear++
                        time.month = 1
                    } else {
                        time.month++
                    }
                    this.date[0] = JSON.parse(JSON.stringify(time))
                    this.current = JSON.parse(JSON.stringify(this.date[0]))
                }
                //显示最新6个月的数据
                for (var i = 1; i < 6; i++) {
                    if (time.month - 1 == 0) {
                        time.year--
                        time.splyear--
                        time.month = 12
                    } else {
                        time.month--
                    }
                    this.date.splice(i, 1, JSON.parse(JSON.stringify(time)))
                }
                if (this.status == 4) {
                    this.getAllList()
                }
            },
            //时间的走动
            timer(){
                if( this.status==1 || this.status==2 || this.status==3 || this.status==7){
                    this.list.forEach(e => {
                        var start=e.interval_time.split(":");
                        var one =start[0];//小时
                        var two =start[1];//分
                        var three =start[2];//秒
                        three++
                        if(three==60){
                            two++;
                            if(two==60){
                                one++
                                two=0
                            }
                            three=0
                        }
                        if(one.toString().length==1){
                            one='0'+one
                        }
                        if(two.toString().length==1){
                            two='0'+two
                        }
                        if(three.toString().length==1){
                            three='0'+three
                        }
                        e.interval_time=one+':'+two+":"+three
                    });
                }
            }
        },
        created(){
            setInterval(this.timer, 1000);
            var date = new Date()
            var time = {
                year: date.getFullYear(),
                splyear: date.getFullYear().toString().slice(2, 4) - 0,//年
                month: date.getMonth() + 1,//月
            }
            this.date[0] = JSON.parse(JSON.stringify(time))//取默认的第一个
            this.current = this.date[0]
            this.changedate(0);//日期
            this.getAllList();//数据
            this.datapopover();//插件
        }
    })
</script>